

<html>
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'role.label', default: 'Role')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <div class="nav">
	<span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
	<span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
  </div>
  <div class="body">
	<h1><g:message code="default.list.label" args="[entityName]" /></h1>
	<g:if test="${flash.message}">
	  <div class="message">${flash.message}</div>
	</g:if>
	<div class="list">
	  <table>
		<thead>
		  <tr>

		<g:sortableColumn property="id" title="${message(code: 'role.id.label', default: 'Id')}" />

		<g:sortableColumn property="roleName" title="${message(code: 'role.roleName.label', default: 'Role Name')}" />

		<g:sortableColumn property="description" title="${message(code: 'role.description.label', default: 'Description')}" />

		<g:sortableColumn property="privileges" title="${message(code:'role.privileges.label', default: 'Roles')}" />

		<g:sortableColumn property="action" title="${message(code:'default.actions.label', default: 'Actions')}" />

		</tr>
		</thead>
		<tbody>
		<g:each in="${roleInstanceList}" status="i" var="roleInstance">
		  <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

			<td><g:link action="show" id="${roleInstance.id}">${fieldValue(bean: roleInstance, field: "id")}</g:link></td>

		  <td>${fieldValue(bean: roleInstance, field: "roleName")}</td>

		  <td>${fieldValue(bean: roleInstance, field: "description")}</td>

		  <td>${fieldValue(bean: roleInstance, field:'privileges')}</td>

		  <td>
		  <g:link action="edit" id="${roleInstance.id}"><g:message code="default.button.edit.label"/></g:link>
		  </td>
		  </tr>
		</g:each>
		</tbody>
	  </table>
	</div>
	<div class="paginateButtons">
	  <g:paginate total="${roleInstanceTotal}" />
	</div>
  </div>
</body>
</html>
